java.time.* isBefore/isAfter folding and LocalDate literals#132
java.time.* isBefore/isAfter folding and LocalDate literals#132alshain wants to merge 1 commit intocheptsov:masterfrom
Conversation
|
I couldn't find a |
|
Comparisons These work great I think. |
|
Literals Literals don't work well enough. Should allow for i18n. I live in Korea. I know individuals that would prefer the literal to look like This would mean providing an override inside the |
|
You have |
|
@ciscorucinski Thanks for the feedback. Comparisons actually work for quite a few types, I just didn't list them all explicitly. I probably also forgot a few, but fixing it is as simple as adding a class name to a list. As for the literals you can also have them displayed as "2019-01-19". I wanted to keep them as close as possible to the actual syntax while keeping legibility. If you switch the order, the entire date will be a folded region. If you keep all the digits in order as they are, you can click into one of the numbers without the template expanding and change it. Sure, configurable suffixes would be nice but I have no idea how to nicely integrate that into the preferences UI. |
|
@alshain I looked more into where I looked at the supported classes, and I saw that only As for the ordering issue. I fully agree that keeping the order would look better and won't fold unneeded parts, but dates are very different across all countries. This plugin is meant for the developer to read their own code more easily, and that does mean i18n support should be included where appropriated. There is no more appropriate place than dates. |
|
|
New folding for LocalDate's isBefore/isAfter and LocalDate.of(2015, 1, 15) as literals (2015-01-15 or 2015Y-01M-15D)